<template>
	<div>
		<h2>根组件</h2>
		<Life v-if="isShow" />
		<Clock v-if="isShow" />
		<button @click="bindUnmountedLife">卸载Life组件</button>
	</div>
</template>

<script setup>
import Life from './Life.vue'
import { ref } from 'vue'
import Clock from './Clock.vue';
const isShow = ref(true)

const bindUnmountedLife = () => {
	isShow.value = !isShow.value
}
</script>

<style lang="css" scoped></style>
